package com.zxy.ziems.server.websocket;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class PingTask {

    @Autowired
    private MyCustomWebSocketHandler myCustomWebSocketHandler;

//    @Scheduled(cron = "0/30 * * * * ?")
    public void pingClient() {
        log.info("==pingClient==");
        myCustomWebSocketHandler.checkHeartbeat();
    }
}
